'use strict'


class self{

    constructor(){
        this.param ='/'
    }

    async get(c){
        let a =c.service.fun
        let {user_id} = c.query
        let data1 = await a.sel('article_list',{'poster_id':`${user_id}`},['article_id','article_title','article_txt','article_img','article_time'],c.service.pool)
        //let data2 = await a.sel('user_list',{'user_id':`${user_id}`},['user_name','user_head'],c.service.pool)
        
        
        //let {article_id,article_title,article_txt,article_img,article_time} = data1.rows[0];
        //let {user_name,user_head} = data2.rows[0];
        
        //let data = [];
        //data.push({article_id,article_title,article_txt,article_img,article_time,user_name,user_head});
        c.send({
            type:'array',
            data:data1.rows
        })
    }
}

module.exports = self
